<template>
  <div class="container"></div>
</template>

<script>
import { onBeforeMount, onMounted } from 'vue'
export default {
  name: 'App',
  setup () {
    onBeforeMount(() => {
      console.log('DOM前', document.querySelector('.container'));
    })
    onMounted(() => {
      console.log('DOM渲染后', document.querySelector('.container'));
    })
  }
}
</script>

<style>
</style>